home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / include / Xm / SelectioBP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-30  |  10.1 KB  |  283 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
  3.  * ALL RIGHTS RESERVED 
  4. */ 
  5. /* 
  6.  * Motif Release 1.2.3
  7. */ 
  8. /*   $RCSfile: SelectioBP.h,v $ $Revision: 10.1 $ $Date: 1994/02/03 15:49:33 $ */
  9. /*
  10. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  11. /*
  12. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  13. #ifndef _XmSelectionBoxP_h
  14. #define _XmSelectionBoxP_h
  15.  
  16. #include <Xm/BulletinBP.h>
  17. #include <Xm/SelectioB.h>
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /* Defines for use in allocation geometry matrix. */
  24.  
  25. #define XmSB_MAX_WIDGETS_VERT    8
  26.  
  27. #define XmUNSPECIFIED        (~0)
  28.  
  29. /* Constraint part record for SelectionBox widget */
  30. typedef struct _XmSelectionBoxConstraintPart
  31. {
  32.    char unused;
  33. } XmSelectionBoxConstraintPart, * XmSelectionBoxConstraint;
  34.  
  35. /*  New fields for the SelectionBox widget class record  */
  36.  
  37. typedef struct
  38. {
  39.         XtCallbackProc  list_callback ;
  40.     XtPointer        extension;      /* Pointer to extension record */
  41. } XmSelectionBoxClassPart;
  42.  
  43.  
  44. /* Full class record declaration */
  45.  
  46. typedef struct _XmSelectionBoxClassRec
  47. {
  48.     CoreClassPart            core_class;
  49.     CompositeClassPart        composite_class;
  50.     ConstraintClassPart        constraint_class;
  51.     XmManagerClassPart        manager_class;
  52.     XmBulletinBoardClassPart    bulletin_board_class;
  53.     XmSelectionBoxClassPart        selection_box_class;
  54. } XmSelectionBoxClassRec;
  55.  
  56. externalref XmSelectionBoxClassRec xmSelectionBoxClassRec;
  57.  
  58.  
  59. /* New fields for the SelectionBox widget record */
  60.  
  61. typedef struct
  62. {
  63.     Widget        list_label;        /*  list Label  */
  64.     XmString    list_label_string;
  65.  
  66.     Widget        list;            /*  List  */
  67.     XmString    *list_items;
  68.     int        list_item_count;
  69.     int        list_visible_item_count;
  70.     int        list_selected_item_position;
  71.  
  72.     Widget        selection_label;    /*  selection Label  */
  73.     XmString    selection_label_string;
  74.  
  75.     Widget        text;            /*  Text  */
  76.     XmString    text_string;
  77.     short        text_columns;
  78.  
  79.     Widget        work_area;        /*  other widget  */
  80.  
  81.     Widget        separator;        /*  separator  */
  82.  
  83.     Widget        ok_button;        /*  enter button  */
  84.     XmString    ok_label_string;
  85.  
  86.     Widget        apply_button;        /*  apply button  */
  87.     XmString    apply_label_string;
  88.  
  89.     XmString    cancel_label_string;    /*  cancel button label  */
  90.  
  91.     Widget        help_button;        /*  help button  */
  92.     XmString    help_label_string;
  93.  
  94.     XtCallbackList    ok_callback;        /*  callbacks  */
  95.     XtCallbackList    apply_callback;
  96.     XtCallbackList    cancel_callback;
  97.     XtCallbackList    no_match_callback;
  98.  
  99.     XtAccelerators    text_accelerators;
  100.  
  101.     Boolean        must_match;        /*  flags  */
  102.     Boolean        adding_sel_widgets;
  103.     Boolean        minimize_buttons;
  104.  
  105.     unsigned char    dialog_type;        /*  prompt or selection  */
  106.       unsigned char   child_placement;
  107. } XmSelectionBoxPart;
  108.  
  109.  
  110. /****************************************************************
  111.  *
  112.  * Full instance record declaration
  113.  *
  114.  ****************************************************************/
  115.  
  116. typedef struct _XmSelectionBoxRec
  117. {
  118.     CorePart        core;
  119.     CompositePart        composite;
  120.     ConstraintPart        constraint;
  121.     XmManagerPart        manager;
  122.     XmBulletinBoardPart    bulletin_board;
  123.     XmSelectionBoxPart    selection_box;
  124. } XmSelectionBoxRec;
  125.  
  126.  
  127. /*  access macros  */
  128.  
  129. #define SB_ListLabel(w) (((XmSelectionBoxWidget) (w))->selection_box.list_label)
  130. #define SB_List(w) (((XmSelectionBoxWidget) (w))->selection_box.list)
  131. #define SB_SelectionLabel(w) (((XmSelectionBoxWidget) (w))->selection_box.selection_label)
  132. #define SB_Text(w) (((XmSelectionBoxWidget) (w))->selection_box.text)
  133. #define SB_WorkArea(w) (((XmSelectionBoxWidget) (w))->selection_box.work_area)
  134. #define SB_Separator(w) (((XmSelectionBoxWidget) (w))->selection_box.separator)
  135. #define SB_OkButton(w) (((XmSelectionBoxWidget) (w))->selection_box.ok_button)
  136. #define SB_ApplyButton(w) (((XmSelectionBoxWidget) (w))->selection_box.apply_button)
  137. #define SB_CancelButton(w) (((XmSelectionBoxWidget) (w))->bulletin_board.cancel_button)
  138. #define SB_HelpButton(w) (((XmSelectionBoxWidget) (w))->selection_box.help_button)
  139. #define SB_DefaultButton(w) (((XmSelectionBoxWidget) (w))->bulletin_board.default_button)
  140. #define SB_MarginHeight(w) (((XmSelectionBoxWidget) (w))->bulletin_board.margin_height)
  141. #define SB_MarginWidth(w) (((XmSelectionBoxWidget) (w))->bulletin_board.margin_width)
  142. #define SB_ButtonFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.button_font_list)
  143. #define SB_LabelFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.label_font_list)
  144. #define SB_TextFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.text_font_list)
  145. #define SB_StringDirection( w) \
  146.                        (((XmSelectionBoxWidget)( w))->manager.string_direction)
  147. #define SB_AddingSelWidgets( w) \
  148.                  (((XmSelectionBoxWidget) w)->selection_box.adding_sel_widgets)
  149. #define SB_TextAccelerators( w) \
  150.                   (((XmSelectionBoxWidget) w)->selection_box.text_accelerators)
  151. #define SB_ListItemCount( w) \
  152.                     (((XmSelectionBoxWidget) w)->selection_box.list_item_count)
  153. #define SB_ListSelectedItemPosition( w) (((XmSelectionBoxWidget) w) \
  154.                                    ->selection_box.list_selected_item_position)
  155. #define SB_ListVisibleItemCount( w) (((XmSelectionBoxWidget) w) \
  156.                                        ->selection_box.list_visible_item_count)
  157. #define SB_TextColumns( w) \
  158.                        (((XmSelectionBoxWidget) w)->selection_box.text_columns)
  159. #define SB_MinimizeButtons( w) \
  160.                    (((XmSelectionBoxWidget) w)->selection_box.minimize_buttons)
  161. #define SB_MustMatch( w) (((XmSelectionBoxWidget) w)->selection_box.must_match)
  162.  
  163.  
  164. /********    Private Function Declarations    ********/
  165. #ifdef _NO_PROTO
  166.  
  167. extern void _XmSelectionBoxCreateListLabel() ;
  168. extern void _XmSelectionBoxCreateSelectionLabel() ;
  169. extern void _XmSelectionBoxCreateList() ;
  170. extern void _XmSelectionBoxCreateText() ;
  171. extern void _XmSelectionBoxCreateSeparator() ;
  172. extern void _XmSelectionBoxCreateOkButton() ;
  173. extern void _XmSelectionBoxCreateApplyButton() ;
  174. extern void _XmSelectionBoxCreateCancelButton() ;
  175. extern void _XmSelectionBoxCreateHelpButton() ;
  176. extern XmGeoMatrix _XmSelectionBoxGeoMatrixCreate() ;
  177. extern Boolean _XmSelectionBoxNoGeoRequest() ;
  178. extern void _XmSelectionBoxGetSelectionLabelString() ;
  179. extern void _XmSelectionBoxGetListLabelString() ;
  180. extern void _XmSelectionBoxGetTextColumns() ;
  181. extern void _XmSelectionBoxGetTextString() ;
  182. extern void _XmSelectionBoxGetListItems() ;
  183. extern void _XmSelectionBoxGetListItemCount() ;
  184. extern void _XmSelectionBoxGetListVisibleItemCount() ;
  185. extern void _XmSelectionBoxGetOkLabelString() ;
  186. extern void _XmSelectionBoxGetApplyLabelString() ;
  187. extern void _XmSelectionBoxGetCancelLabelString() ;
  188. extern void _XmSelectionBoxGetHelpLabelString() ;
  189. extern void _XmSelectionBoxUpOrDown() ;
  190. extern void _XmSelectionBoxRestore() ;
  191.  
  192. #else
  193.  
  194. extern void _XmSelectionBoxCreateListLabel( 
  195.                         XmSelectionBoxWidget sel) ;
  196. extern void _XmSelectionBoxCreateSelectionLabel( 
  197.                         XmSelectionBoxWidget sel) ;
  198. extern void _XmSelectionBoxCreateList( 
  199.                         XmSelectionBoxWidget sel) ;
  200. extern void _XmSelectionBoxCreateText( 
  201.                         XmSelectionBoxWidget sel) ;
  202. extern void _XmSelectionBoxCreateSeparator( 
  203.                         XmSelectionBoxWidget sel) ;
  204. extern void _XmSelectionBoxCreateOkButton( 
  205.                         XmSelectionBoxWidget sel) ;
  206. extern void _XmSelectionBoxCreateApplyButton( 
  207.                         XmSelectionBoxWidget sel) ;
  208. extern void _XmSelectionBoxCreateCancelButton( 
  209.                         XmSelectionBoxWidget sel) ;
  210. extern void _XmSelectionBoxCreateHelpButton( 
  211.                         XmSelectionBoxWidget sel) ;
  212. extern XmGeoMatrix _XmSelectionBoxGeoMatrixCreate( 
  213.                         Widget wid,
  214.                         Widget instigator,
  215.                         XtWidgetGeometry *desired) ;
  216. extern Boolean _XmSelectionBoxNoGeoRequest( 
  217.                         XmGeoMatrix geoSpec) ;
  218. extern void _XmSelectionBoxGetSelectionLabelString( 
  219.                         Widget wid,
  220.                         int resource_offset,
  221.                         XtArgVal *value) ;
  222. extern void _XmSelectionBoxGetListLabelString( 
  223.                         Widget wid,
  224.                         int resource_offset,
  225.                         XtArgVal *value) ;
  226. extern void _XmSelectionBoxGetTextColumns( 
  227.                         Widget wid,
  228.                         int resource_offset,
  229.                         XtArgVal *value) ;
  230. extern void _XmSelectionBoxGetTextString( 
  231.                         Widget wid,
  232.                         int resource_offset,
  233.                         XtArgVal *value) ;
  234. extern void _XmSelectionBoxGetListItems( 
  235.                         Widget wid,
  236.                         int resource_offset,
  237.                         XtArgVal *value) ;
  238. extern void _XmSelectionBoxGetListItemCount( 
  239.                         Widget wid,
  240.                         int resource_offset,
  241.                         XtArgVal *value) ;
  242. extern void _XmSelectionBoxGetListVisibleItemCount( 
  243.                         Widget wid,
  244.                         int resource_offset,
  245.                         XtArgVal *value) ;
  246. extern void _XmSelectionBoxGetOkLabelString( 
  247.                         Widget wid,
  248.                         int resource_offset,
  249.                         XtArgVal *value) ;
  250. extern void _XmSelectionBoxGetApplyLabelString( 
  251.                         Widget wid,
  252.                         int resource_offset,
  253.                         XtArgVal *value) ;
  254. extern void _XmSelectionBoxGetCancelLabelString( 
  255.                         Widget wid,
  256.                         int resource_offset,
  257.                         XtArgVal *value) ;
  258. extern void _XmSelectionBoxGetHelpLabelString( 
  259.                         Widget wid,
  260.                         int resource_offset,
  261.                         XtArgVal *value) ;
  262. extern void _XmSelectionBoxUpOrDown( 
  263.                         Widget wid,
  264.                         XEvent *event,
  265.                         String *argv,
  266.                         Cardinal *argc) ;
  267. extern void _XmSelectionBoxRestore( 
  268.                         Widget wid,
  269.                         XEvent *event,
  270.                         String *argv,
  271.                         Cardinal *argc) ;
  272.  
  273. #endif /* _NO_PROTO */
  274. /********    End Private Function Declarations    ********/
  275.  
  276.  
  277. #ifdef __cplusplus
  278. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  279. #endif
  280.  
  281. #endif /* _XmSelectionBoxP_h */
  282. /* DON'T ADD ANYTHING AFTER THIS #endif */
  283.